package gui.tools;
import database.DatabaseConnection;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.swing.ImageIcon;
import javax.swing.JDialog;
import javax.swing.JOptionPane;
import javax.swing.UIManager;
import javax.swing.table.DefaultTableModel;
import org.jvnet.substance.skin.SubstanceBusinessBlackSteelLookAndFeel;
import server.MapleItemInformationProvider;
import gui.ZeroMS_UI;

/**
 *
 * @author Administrator
 */
public class 锻造控制台 extends javax.swing.JFrame {

    /**
     * Creates new form 锻造控制台
     */
    public 锻造控制台() {
        ImageIcon icon = new ImageIcon(getClass().getClassLoader().getResource("Image/Icon.png"));
        setIconImage(icon.getImage());
        setTitle("锻造控制台");
        initComponents();
    }

    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jPanel1 = new javax.swing.JPanel();
        jPanel2 = new javax.swing.JPanel();
        jScrollPane2 = new javax.swing.JScrollPane();
        锻造所需材料 = new javax.swing.JTable();
        锻造编号 = new javax.swing.JTextField();
        锻造材料代码 = new javax.swing.JTextField();
        锻造材料数量 = new javax.swing.JTextField();
        jLabel1 = new javax.swing.JLabel();
        锻造序号 = new javax.swing.JTextField();
        jLabel3 = new javax.swing.JLabel();
        jLabel4 = new javax.swing.JLabel();
        jLabel15 = new javax.swing.JLabel();
        删除锻造材料 = new javax.swing.JButton();
        修改锻造材料 = new javax.swing.JButton();
        新增锻造材料 = new javax.swing.JButton();
        jLabel30 = new javax.swing.JLabel();
        jPanel3 = new javax.swing.JPanel();
        jScrollPane1 = new javax.swing.JScrollPane();
        锻造完成物品 = new javax.swing.JTable();
        锻造编号1 = new javax.swing.JTextField();
        锻造材料代码1 = new javax.swing.JTextField();
        锻造材料数量1 = new javax.swing.JTextField();
        jLabel22 = new javax.swing.JLabel();
        锻造序号1 = new javax.swing.JTextField();
        jLabel23 = new javax.swing.JLabel();
        jLabel24 = new javax.swing.JLabel();
        jLabel25 = new javax.swing.JLabel();
        删除锻造材料1 = new javax.swing.JButton();
        修改锻造材料1 = new javax.swing.JButton();
        新增锻造材料1 = new javax.swing.JButton();
        jPanel4 = new javax.swing.JPanel();
        力量 = new javax.swing.JTextField();
        jLabel5 = new javax.swing.JLabel();
        敏捷 = new javax.swing.JTextField();
        jLabel6 = new javax.swing.JLabel();
        智力 = new javax.swing.JTextField();
        jLabel7 = new javax.swing.JLabel();
        运气 = new javax.swing.JTextField();
        jLabel8 = new javax.swing.JLabel();
        物防 = new javax.swing.JTextField();
        jLabel9 = new javax.swing.JLabel();
        魔防 = new javax.swing.JTextField();
        jLabel10 = new javax.swing.JLabel();
        闪避 = new javax.swing.JTextField();
        jLabel11 = new javax.swing.JLabel();
        命中 = new javax.swing.JTextField();
        jLabel12 = new javax.swing.JLabel();
        HP = new javax.swing.JTextField();
        jLabel13 = new javax.swing.JLabel();
        MP = new javax.swing.JTextField();
        jLabel14 = new javax.swing.JLabel();
        物攻 = new javax.swing.JTextField();
        魔攻1 = new javax.swing.JLabel();
        魔攻 = new javax.swing.JTextField();
        jLabel16 = new javax.swing.JLabel();
        移速 = new javax.swing.JTextField();
        jLabel17 = new javax.swing.JLabel();
        跳跃 = new javax.swing.JTextField();
        jLabel18 = new javax.swing.JLabel();
        升级 = new javax.swing.JTextField();
        jLabel19 = new javax.swing.JLabel();
        限时 = new javax.swing.JTextField();
        jLabel20 = new javax.swing.JLabel();
        状态 = new javax.swing.JTextField();
        状态详细 = new javax.swing.JButton();
        jLabel21 = new javax.swing.JLabel();
        jButton1 = new javax.swing.JButton();
        查看编号 = new javax.swing.JTextField();
        jLabel2 = new javax.swing.JLabel();
        jButton2 = new javax.swing.JButton();
        jLabel26 = new javax.swing.JLabel();
        jLabel27 = new javax.swing.JLabel();
        jLabel28 = new javax.swing.JLabel();
        jLabel29 = new javax.swing.JLabel();

        setResizable(false);
        getContentPane().setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());

        jPanel1.setBackground(new java.awt.Color(255, 255, 255));
        jPanel1.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());

        jPanel2.setBackground(new java.awt.Color(255, 255, 255));
        jPanel2.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "锻造所需材料", javax.swing.border.TitledBorder.CENTER, javax.swing.border.TitledBorder.TOP, new java.awt.Font("幼圆", 0, 24), java.awt.Color.black)); // NOI18N
        jPanel2.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());

        锻造所需材料.setFont(new java.awt.Font("幼圆", 0, 15)); // NOI18N
        锻造所需材料.setForeground(new java.awt.Color(255, 51, 51));
        锻造所需材料.setModel(new DefaultTableModel(
            new Object [][] {
                {null, null, null, null, null},
                {null, null, null, null, null},
                {null, null, null, null, null},
                {null, null, null, null, null},
                {null, null, null, null, null},
                {null, null, null, null, null},
                {null, null, null, null, null},
                {null, null, null, null, null},
                {null, null, null, null, null},
                {null, null, null, null, null},
                {null, null, null, null, null},
                {null, null, null, null, null},
                {null, null, null, null, null},
                {null, null, null, null, null},
                {null, null, null, null, null},
                {null, null, null, null, null},
                {null, null, null, null, null},
                {null, null, null, null, null},
                {null, null, null, null, null},
                {null, null, null, null, null},
                {null, null, null, null, null},
                {null, null, null, null, null},
                {null, null, null, null, null},
                {null, null, null, null, null},
                {null, null, null, null, null},
                {null, null, null, null, null},
                {null, null, null, null, null},
                {null, null, null, null, null},
                {null, null, null, null, null},
                {null, null, null, null, null},
                {null, null, null, null, null},
                {null, null, null, null, null},
                {null, null, null, null, null},
                {null, null, null, null, null},
                {null, null, null, null, null},
                {null, null, null, null, null},
                {null, null, null, null, null},
                {null, null, null, null, null},
                {null, null, null, null, null},
                {null, null, null, null, null},
                {null, null, null, null, null},
                {null, null, null, null, null},
                {null, null, null, null, null},
                {null, null, null, null, null},
                {null, null, null, null, null},
                {null, null, null, null, null},
                {null, null, null, null, null},
                {null, null, null, null, null},
                {null, null, null, null, null},
                {null, null, null, null, null},
                {null, null, null, null, null},
                {null, null, null, null, null},
                {null, null, null, null, null},
                {null, null, null, null, null},
                {null, null, null, null, null},
                {null, null, null, null, null},
                {null, null, null, null, null}
            },
            new String [] {
                "序号", "编号", "物品代码", "材料名称", "材料数量"
            }
        ) {
            boolean[] canEdit = new boolean [] {
                false, false, false, false, false
            };

            public boolean isCellEditable(int rowIndex, int columnIndex) {
                return canEdit [columnIndex];
            }
        });
        jScrollPane2.setViewportView(锻造所需材料);
        if (锻造所需材料.getColumnModel().getColumnCount() > 0) {
            锻造所需材料.getColumnModel().getColumn(0).setResizable(false);
            锻造所需材料.getColumnModel().getColumn(0).setPreferredWidth(50);
            锻造所需材料.getColumnModel().getColumn(1).setResizable(false);
            锻造所需材料.getColumnModel().getColumn(1).setPreferredWidth(50);
            锻造所需材料.getColumnModel().getColumn(2).setResizable(false);
            锻造所需材料.getColumnModel().getColumn(2).setPreferredWidth(100);
            锻造所需材料.getColumnModel().getColumn(3).setResizable(false);
            锻造所需材料.getColumnModel().getColumn(3).setPreferredWidth(150);
            锻造所需材料.getColumnModel().getColumn(4).setResizable(false);
            锻造所需材料.getColumnModel().getColumn(4).setPreferredWidth(80);
        }

        jPanel2.add(jScrollPane2, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 30, 430, 270));
        jPanel2.add(锻造编号, new org.netbeans.lib.awtextra.AbsoluteConstraints(90, 350, 90, -1));
        jPanel2.add(锻造材料代码, new org.netbeans.lib.awtextra.AbsoluteConstraints(180, 350, 120, -1));
        jPanel2.add(锻造材料数量, new org.netbeans.lib.awtextra.AbsoluteConstraints(300, 350, 120, -1));

        jLabel1.setFont(new java.awt.Font("幼圆", 0, 14)); // NOI18N
        jLabel1.setText("材料数量；");
        jPanel2.add(jLabel1, new org.netbeans.lib.awtextra.AbsoluteConstraints(300, 320, 110, 30));

        锻造序号.setEditable(false);
        jPanel2.add(锻造序号, new org.netbeans.lib.awtextra.AbsoluteConstraints(30, 350, 60, -1));

        jLabel3.setFont(new java.awt.Font("幼圆", 0, 14)); // NOI18N
        jLabel3.setText("材料代码； 0 = 金币 ， 1 = 点券");
        jPanel2.add(jLabel3, new org.netbeans.lib.awtextra.AbsoluteConstraints(30, 300, 350, 30));

        jLabel4.setFont(new java.awt.Font("幼圆", 0, 14)); // NOI18N
        jLabel4.setText("编号;");
        jPanel2.add(jLabel4, new org.netbeans.lib.awtextra.AbsoluteConstraints(90, 320, 50, 30));

        jLabel15.setFont(new java.awt.Font("幼圆", 0, 14)); // NOI18N
        jLabel15.setText("材料代码；");
        jPanel2.add(jLabel15, new org.netbeans.lib.awtextra.AbsoluteConstraints(180, 320, 100, 30));

        删除锻造材料.setText("删除");
        删除锻造材料.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                删除锻造材料ActionPerformed(evt);
            }
        });
        jPanel2.add(删除锻造材料, new org.netbeans.lib.awtextra.AbsoluteConstraints(170, 380, 70, 30));

        修改锻造材料.setText("修改");
        修改锻造材料.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                修改锻造材料ActionPerformed(evt);
            }
        });
        jPanel2.add(修改锻造材料, new org.netbeans.lib.awtextra.AbsoluteConstraints(30, 380, 70, 30));

        新增锻造材料.setText("新增");
        新增锻造材料.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                新增锻造材料ActionPerformed(evt);
            }
        });
        jPanel2.add(新增锻造材料, new org.netbeans.lib.awtextra.AbsoluteConstraints(100, 380, 70, 30));

        jLabel30.setFont(new java.awt.Font("幼圆", 0, 14)); // NOI18N
        jLabel30.setText("序号；");
        jPanel2.add(jLabel30, new org.netbeans.lib.awtextra.AbsoluteConstraints(30, 320, 50, 30));

        jPanel1.add(jPanel2, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 320, 470, 430));

        jPanel3.setBackground(new java.awt.Color(255, 255, 255));
        jPanel3.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "锻造完成物品/如果该物品有属性，请看物品属性区域", javax.swing.border.TitledBorder.CENTER, javax.swing.border.TitledBorder.TOP, new java.awt.Font("幼圆", 0, 24), java.awt.Color.black)); // NOI18N
        jPanel3.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());

        锻造完成物品.setFont(new java.awt.Font("幼圆", 0, 15)); // NOI18N
        锻造完成物品.setForeground(new java.awt.Color(255, 0, 0));
        锻造完成物品.setModel(new DefaultTableModel(
            new Object [][] {
                {null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null},
                {null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null},
                {null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null},
                {null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null},
                {null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null},
                {null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null},
                {null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null},
                {null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null},
                {null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null},
                {null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null},
                {null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null},
                {null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null},
                {null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null},
                {null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null},
                {null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null},
                {null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null},
                {null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null},
                {null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null},
                {null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null},
                {null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null},
                {null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null},
                {null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null},
                {null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null},
                {null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null},
                {null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null},
                {null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null},
                {null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null},
                {null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null},
                {null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null},
                {null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null},
                {null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null},
                {null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null},
                {null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null},
                {null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null},
                {null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null},
                {null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null},
                {null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null},
                {null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null},
                {null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null},
                {null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null},
                {null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null},
                {null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null},
                {null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null},
                {null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null},
                {null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null},
                {null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null},
                {null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null},
                {null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null},
                {null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null},
                {null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null},
                {null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null},
                {null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null},
                {null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null},
                {null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null},
                {null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null},
                {null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null},
                {null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null}
            },
            new String [] {
                "序号", "编号", "物品代码", "材料名称", "材料数量", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17"
            }
        ) {
            boolean[] canEdit = new boolean [] {
                false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false
            };

            public boolean isCellEditable(int rowIndex, int columnIndex) {
                return canEdit [columnIndex];
            }
        });
        jScrollPane1.setViewportView(锻造完成物品);
        if (锻造完成物品.getColumnModel().getColumnCount() > 0) {
            锻造完成物品.getColumnModel().getColumn(0).setResizable(false);
            锻造完成物品.getColumnModel().getColumn(0).setPreferredWidth(50);
            锻造完成物品.getColumnModel().getColumn(1).setResizable(false);
            锻造完成物品.getColumnModel().getColumn(1).setPreferredWidth(50);
            锻造完成物品.getColumnModel().getColumn(2).setResizable(false);
            锻造完成物品.getColumnModel().getColumn(2).setPreferredWidth(100);
            锻造完成物品.getColumnModel().getColumn(3).setResizable(false);
            锻造完成物品.getColumnModel().getColumn(3).setPreferredWidth(150);
            锻造完成物品.getColumnModel().getColumn(4).setResizable(false);
            锻造完成物品.getColumnModel().getColumn(4).setPreferredWidth(80);
            锻造完成物品.getColumnModel().getColumn(5).setResizable(false);
            锻造完成物品.getColumnModel().getColumn(5).setPreferredWidth(10);
            锻造完成物品.getColumnModel().getColumn(6).setResizable(false);
            锻造完成物品.getColumnModel().getColumn(6).setPreferredWidth(10);
            锻造完成物品.getColumnModel().getColumn(7).setResizable(false);
            锻造完成物品.getColumnModel().getColumn(7).setPreferredWidth(10);
            锻造完成物品.getColumnModel().getColumn(8).setResizable(false);
            锻造完成物品.getColumnModel().getColumn(8).setPreferredWidth(10);
            锻造完成物品.getColumnModel().getColumn(9).setResizable(false);
            锻造完成物品.getColumnModel().getColumn(9).setPreferredWidth(10);
            锻造完成物品.getColumnModel().getColumn(10).setResizable(false);
            锻造完成物品.getColumnModel().getColumn(10).setPreferredWidth(10);
            锻造完成物品.getColumnModel().getColumn(11).setResizable(false);
            锻造完成物品.getColumnModel().getColumn(11).setPreferredWidth(10);
            锻造完成物品.getColumnModel().getColumn(12).setResizable(false);
            锻造完成物品.getColumnModel().getColumn(12).setPreferredWidth(10);
            锻造完成物品.getColumnModel().getColumn(13).setResizable(false);
            锻造完成物品.getColumnModel().getColumn(13).setPreferredWidth(10);
            锻造完成物品.getColumnModel().getColumn(14).setResizable(false);
            锻造完成物品.getColumnModel().getColumn(14).setPreferredWidth(10);
            锻造完成物品.getColumnModel().getColumn(15).setResizable(false);
            锻造完成物品.getColumnModel().getColumn(15).setPreferredWidth(10);
            锻造完成物品.getColumnModel().getColumn(16).setResizable(false);
            锻造完成物品.getColumnModel().getColumn(16).setPreferredWidth(10);
            锻造完成物品.getColumnModel().getColumn(17).setResizable(false);
            锻造完成物品.getColumnModel().getColumn(17).setPreferredWidth(10);
            锻造完成物品.getColumnModel().getColumn(18).setResizable(false);
            锻造完成物品.getColumnModel().getColumn(18).setPreferredWidth(10);
            锻造完成物品.getColumnModel().getColumn(19).setResizable(false);
            锻造完成物品.getColumnModel().getColumn(19).setPreferredWidth(10);
            锻造完成物品.getColumnModel().getColumn(20).setResizable(false);
            锻造完成物品.getColumnModel().getColumn(20).setPreferredWidth(10);
            锻造完成物品.getColumnModel().getColumn(21).setResizable(false);
            锻造完成物品.getColumnModel().getColumn(21).setPreferredWidth(10);
        }

        jPanel3.add(jScrollPane1, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 30, 1140, 210));
        jPanel3.add(锻造编号1, new org.netbeans.lib.awtextra.AbsoluteConstraints(90, 270, 90, -1));
        jPanel3.add(锻造材料代码1, new org.netbeans.lib.awtextra.AbsoluteConstraints(180, 270, 120, -1));
        jPanel3.add(锻造材料数量1, new org.netbeans.lib.awtextra.AbsoluteConstraints(300, 270, 120, -1));

        jLabel22.setFont(new java.awt.Font("幼圆", 0, 14)); // NOI18N
        jLabel22.setText("材料数量；");
        jPanel3.add(jLabel22, new org.netbeans.lib.awtextra.AbsoluteConstraints(300, 240, 110, 30));

        锻造序号1.setEditable(false);
        jPanel3.add(锻造序号1, new org.netbeans.lib.awtextra.AbsoluteConstraints(30, 270, 60, -1));

        jLabel23.setFont(new java.awt.Font("幼圆", 0, 14)); // NOI18N
        jLabel23.setText("序号；");
        jPanel3.add(jLabel23, new org.netbeans.lib.awtextra.AbsoluteConstraints(30, 240, 50, 30));

        jLabel24.setFont(new java.awt.Font("幼圆", 0, 14)); // NOI18N
        jLabel24.setText("编号;");
        jPanel3.add(jLabel24, new org.netbeans.lib.awtextra.AbsoluteConstraints(90, 240, 50, 30));

        jLabel25.setFont(new java.awt.Font("幼圆", 0, 14)); // NOI18N
        jLabel25.setText("材料代码；");
        jPanel3.add(jLabel25, new org.netbeans.lib.awtextra.AbsoluteConstraints(180, 240, 100, 30));

        删除锻造材料1.setText("删除");
        删除锻造材料1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                删除锻造材料1ActionPerformed(evt);
            }
        });
        jPanel3.add(删除锻造材料1, new org.netbeans.lib.awtextra.AbsoluteConstraints(570, 270, 70, 25));

        修改锻造材料1.setText("修改");
        修改锻造材料1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                修改锻造材料1ActionPerformed(evt);
            }
        });
        jPanel3.add(修改锻造材料1, new org.netbeans.lib.awtextra.AbsoluteConstraints(430, 270, 70, 25));

        新增锻造材料1.setText("新增");
        新增锻造材料1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                新增锻造材料1ActionPerformed(evt);
            }
        });
        jPanel3.add(新增锻造材料1, new org.netbeans.lib.awtextra.AbsoluteConstraints(500, 270, 70, 25));

        jPanel1.add(jPanel3, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 10, 1170, 310));

        jPanel4.setBackground(new java.awt.Color(255, 255, 255));
        jPanel4.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "物品属性", javax.swing.border.TitledBorder.CENTER, javax.swing.border.TitledBorder.TOP, new java.awt.Font("幼圆", 0, 24), java.awt.Color.black)); // NOI18N
        jPanel4.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());

        力量.setForeground(new java.awt.Color(0, 0, 255));
        力量.setText("0");
        jPanel4.add(力量, new org.netbeans.lib.awtextra.AbsoluteConstraints(90, 50, 80, 25));

        jLabel5.setFont(new java.awt.Font("幼圆", 0, 14)); // NOI18N
        jLabel5.setText("敏捷；");
        jPanel4.add(jLabel5, new org.netbeans.lib.awtextra.AbsoluteConstraints(50, 80, 50, 30));

        敏捷.setForeground(new java.awt.Color(0, 0, 255));
        敏捷.setText("0");
        jPanel4.add(敏捷, new org.netbeans.lib.awtextra.AbsoluteConstraints(90, 80, 80, 25));

        jLabel6.setFont(new java.awt.Font("幼圆", 0, 14)); // NOI18N
        jLabel6.setText("智力；");
        jPanel4.add(jLabel6, new org.netbeans.lib.awtextra.AbsoluteConstraints(50, 110, 50, 30));

        智力.setForeground(new java.awt.Color(0, 0, 255));
        智力.setText("0");
        jPanel4.add(智力, new org.netbeans.lib.awtextra.AbsoluteConstraints(90, 110, 80, 25));

        jLabel7.setFont(new java.awt.Font("幼圆", 0, 14)); // NOI18N
        jLabel7.setText("运气；");
        jPanel4.add(jLabel7, new org.netbeans.lib.awtextra.AbsoluteConstraints(50, 140, 50, 30));

        运气.setForeground(new java.awt.Color(0, 0, 255));
        运气.setText("0");
        jPanel4.add(运气, new org.netbeans.lib.awtextra.AbsoluteConstraints(90, 140, 80, 25));

        jLabel8.setFont(new java.awt.Font("幼圆", 0, 14)); // NOI18N
        jLabel8.setText("物防；");
        jPanel4.add(jLabel8, new org.netbeans.lib.awtextra.AbsoluteConstraints(370, 50, 50, 30));

        物防.setForeground(new java.awt.Color(0, 0, 255));
        物防.setText("0");
        jPanel4.add(物防, new org.netbeans.lib.awtextra.AbsoluteConstraints(410, 50, 80, 25));

        jLabel9.setFont(new java.awt.Font("幼圆", 0, 14)); // NOI18N
        jLabel9.setText("魔防；");
        jPanel4.add(jLabel9, new org.netbeans.lib.awtextra.AbsoluteConstraints(370, 80, 50, 30));

        魔防.setForeground(new java.awt.Color(0, 0, 255));
        魔防.setText("0");
        jPanel4.add(魔防, new org.netbeans.lib.awtextra.AbsoluteConstraints(410, 80, 80, 25));

        jLabel10.setFont(new java.awt.Font("幼圆", 0, 14)); // NOI18N
        jLabel10.setText("闪避；");
        jPanel4.add(jLabel10, new org.netbeans.lib.awtextra.AbsoluteConstraints(370, 110, 50, 30));

        闪避.setForeground(new java.awt.Color(0, 0, 255));
        闪避.setText("0");
        jPanel4.add(闪避, new org.netbeans.lib.awtextra.AbsoluteConstraints(410, 110, 80, 25));

        jLabel11.setFont(new java.awt.Font("幼圆", 0, 14)); // NOI18N
        jLabel11.setText("命中；");
        jPanel4.add(jLabel11, new org.netbeans.lib.awtextra.AbsoluteConstraints(370, 140, 50, 30));

        命中.setForeground(new java.awt.Color(0, 0, 255));
        命中.setText("0");
        jPanel4.add(命中, new org.netbeans.lib.awtextra.AbsoluteConstraints(410, 140, 80, 25));

        jLabel12.setFont(new java.awt.Font("幼圆", 0, 14)); // NOI18N
        jLabel12.setText("HP；");
        jPanel4.add(jLabel12, new org.netbeans.lib.awtextra.AbsoluteConstraints(210, 50, 50, 30));

        HP.setForeground(new java.awt.Color(0, 0, 255));
        HP.setText("0");
        jPanel4.add(HP, new org.netbeans.lib.awtextra.AbsoluteConstraints(250, 50, 80, 25));

        jLabel13.setFont(new java.awt.Font("幼圆", 0, 14)); // NOI18N
        jLabel13.setText("MP；");
        jPanel4.add(jLabel13, new org.netbeans.lib.awtextra.AbsoluteConstraints(210, 80, 50, 30));

        MP.setForeground(new java.awt.Color(0, 0, 255));
        MP.setText("0");
        jPanel4.add(MP, new org.netbeans.lib.awtextra.AbsoluteConstraints(250, 80, 80, 25));

        jLabel14.setFont(new java.awt.Font("幼圆", 0, 14)); // NOI18N
        jLabel14.setText("物攻；");
        jPanel4.add(jLabel14, new org.netbeans.lib.awtextra.AbsoluteConstraints(210, 110, 50, 30));

        物攻.setForeground(new java.awt.Color(0, 0, 255));
        物攻.setText("0");
        jPanel4.add(物攻, new org.netbeans.lib.awtextra.AbsoluteConstraints(250, 110, 80, 25));

        魔攻1.setFont(new java.awt.Font("幼圆", 0, 14)); // NOI18N
        魔攻1.setText("魔攻；");
        jPanel4.add(魔攻1, new org.netbeans.lib.awtextra.AbsoluteConstraints(210, 140, 50, 30));

        魔攻.setForeground(new java.awt.Color(0, 0, 255));
        魔攻.setText("0");
        jPanel4.add(魔攻, new org.netbeans.lib.awtextra.AbsoluteConstraints(250, 140, 80, 25));

        jLabel16.setFont(new java.awt.Font("幼圆", 0, 14)); // NOI18N
        jLabel16.setText("移速；");
        jPanel4.add(jLabel16, new org.netbeans.lib.awtextra.AbsoluteConstraints(520, 50, 50, 30));

        移速.setForeground(new java.awt.Color(0, 0, 255));
        移速.setText("0");
        jPanel4.add(移速, new org.netbeans.lib.awtextra.AbsoluteConstraints(560, 50, 80, 25));

        jLabel17.setFont(new java.awt.Font("幼圆", 0, 14)); // NOI18N
        jLabel17.setText("跳跃；");
        jPanel4.add(jLabel17, new org.netbeans.lib.awtextra.AbsoluteConstraints(520, 80, 50, 30));

        跳跃.setForeground(new java.awt.Color(0, 0, 255));
        跳跃.setText("0");
        jPanel4.add(跳跃, new org.netbeans.lib.awtextra.AbsoluteConstraints(560, 80, 80, 25));

        jLabel18.setFont(new java.awt.Font("幼圆", 0, 14)); // NOI18N
        jLabel18.setText("升级；");
        jPanel4.add(jLabel18, new org.netbeans.lib.awtextra.AbsoluteConstraints(520, 110, 50, 30));

        升级.setForeground(new java.awt.Color(0, 0, 255));
        升级.setText("0");
        jPanel4.add(升级, new org.netbeans.lib.awtextra.AbsoluteConstraints(560, 110, 80, 25));

        jLabel19.setFont(new java.awt.Font("幼圆", 0, 14)); // NOI18N
        jLabel19.setText("限时；");
        jPanel4.add(jLabel19, new org.netbeans.lib.awtextra.AbsoluteConstraints(520, 140, 50, 30));

        限时.setForeground(new java.awt.Color(0, 0, 255));
        限时.setText("0");
        jPanel4.add(限时, new org.netbeans.lib.awtextra.AbsoluteConstraints(560, 140, 80, 25));

        jLabel20.setFont(new java.awt.Font("幼圆", 0, 14)); // NOI18N
        jLabel20.setText("状态；");
        jPanel4.add(jLabel20, new org.netbeans.lib.awtextra.AbsoluteConstraints(50, 180, 50, 30));

        状态.setForeground(new java.awt.Color(0, 0, 255));
        状态.setText("0");
        jPanel4.add(状态, new org.netbeans.lib.awtextra.AbsoluteConstraints(90, 180, 80, 25));

        状态详细.setText("状态详细");
        状态详细.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                状态详细ActionPerformed(evt);
            }
        });
        jPanel4.add(状态详细, new org.netbeans.lib.awtextra.AbsoluteConstraints(210, 180, 100, 30));

        jLabel21.setFont(new java.awt.Font("幼圆", 0, 14)); // NOI18N
        jLabel21.setText("力量；");
        jPanel4.add(jLabel21, new org.netbeans.lib.awtextra.AbsoluteConstraints(50, 50, 50, 30));

        jPanel1.add(jPanel4, new org.netbeans.lib.awtextra.AbsoluteConstraints(490, 320, 680, 230));

        jButton1.setText("查看锻造方案");
        jButton1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton1ActionPerformed(evt);
            }
        });
        jPanel1.add(jButton1, new org.netbeans.lib.awtextra.AbsoluteConstraints(610, 710, 150, 30));

        查看编号.setText("0");
        jPanel1.add(查看编号, new org.netbeans.lib.awtextra.AbsoluteConstraints(500, 710, 100, 30));

        jLabel2.setFont(new java.awt.Font("幼圆", 0, 18)); // NOI18N
        jLabel2.setText("物品属性。设置好后，生成方案脚本，即可。");
        jPanel1.add(jLabel2, new org.netbeans.lib.awtextra.AbsoluteConstraints(500, 650, 680, 30));

        jButton2.setText("生成锻造方案脚本");
        jButton2.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton2ActionPerformed(evt);
            }
        });
        jPanel1.add(jButton2, new org.netbeans.lib.awtextra.AbsoluteConstraints(770, 710, 200, 30));

        jLabel26.setFont(new java.awt.Font("幼圆", 0, 14)); // NOI18N
        jLabel26.setText("锻造方案编号；");
        jPanel1.add(jLabel26, new org.netbeans.lib.awtextra.AbsoluteConstraints(500, 680, 130, 30));

        jLabel27.setFont(new java.awt.Font("幼圆", 0, 18)); // NOI18N
        jLabel27.setText("使用说明；");
        jPanel1.add(jLabel27, new org.netbeans.lib.awtextra.AbsoluteConstraints(500, 560, 130, 30));

        jLabel28.setFont(new java.awt.Font("幼圆", 0, 18)); // NOI18N
        jLabel28.setText("在这里自定义一个编号的锻造方案，设置好该方案（锻造所需材料）的物品");
        jPanel1.add(jLabel28, new org.netbeans.lib.awtextra.AbsoluteConstraints(540, 590, 630, 30));

        jLabel29.setFont(new java.awt.Font("幼圆", 0, 18)); // NOI18N
        jLabel29.setText("数量以及代码，然后设置（锻造完成物品）区域的奖励，如果是装备，则需要设置");
        jPanel1.add(jLabel29, new org.netbeans.lib.awtextra.AbsoluteConstraints(500, 620, 680, 30));

        getContentPane().add(jPanel1, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 0, 1190, 760));

        pack();
        setLocationRelativeTo(null);
    }// </editor-fold>//GEN-END:initComponents

    private void 状态详细ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_状态详细ActionPerformed
        JOptionPane.showMessageDialog(null, "状态详细：\r\n"
                + "0，无状态\r\n"
                + "1，封印\r\n"
                + "2，防滑\r\n"
                + "3，封印，防滑\r\n"
                + "4，防寒\r\n"
                + "5，封印，防寒\r\n"
                + "6，防寒，防滑\r\n"
                + "7，封印，防寒，防滑\r\n"
                + "8，不可交换\r\n"
                + "9，封印，不可交换\r\n"
                + "10，防滑，不可交换\r\n"
                + "11，封印,防滑,不可交换\r\n"
                + "12，防寒,不可交换\r\n"
                + "13，封印,防寒,不可交换\r\n"
                + "14，防滑,防寒,不可交换\r\n"
                + "15，封印,防滑,防寒,不可交换");
    }//GEN-LAST:event_状态详细ActionPerformed

    private void 新增锻造材料ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_新增锻造材料ActionPerformed
        boolean result1 = this.锻造编号.getText().matches("[0-9]+");
        boolean result2 = this.锻造材料代码.getText().matches("[0-9]+");
        boolean result3 = this.锻造材料数量.getText().matches("[0-9]+");
        if (result1 && result2 && result3) {
            try (Connection con = DatabaseConnection.getConnection(); PreparedStatement ps = con.prepareStatement("INSERT INTO 锻造材料表 ( id2,物品代码,物品数量) VALUES (  ?, ?, ?)")) {
                ps.setInt(1, Integer.parseInt(this.锻造编号.getText()));
                ps.setInt(2, Integer.parseInt(this.锻造材料代码.getText()));
                ps.setInt(3, Integer.parseInt(this.锻造材料数量.getText()));
                ps.executeUpdate();
            } catch (SQLException ex) {
                Logger.getLogger(ZeroMS_UI.class.getName()).log(Level.SEVERE, null, ex);
            }
            JOptionPane.showMessageDialog(null, "添加成功。");
        } else {
            JOptionPane.showMessageDialog(null, "请填写正确的值。");
        }
    }//GEN-LAST:event_新增锻造材料ActionPerformed

    private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed
        刷新锻造所需材料();
        刷新锻造奖励();
    }//GEN-LAST:event_jButton1ActionPerformed

    private void 修改锻造材料ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_修改锻造材料ActionPerformed
        boolean result2 = this.锻造材料代码.getText().matches("[0-9]+");
        boolean result3 = this.锻造材料数量.getText().matches("[0-9]+");
        if (result2 && result3) {
            try {
                PreparedStatement ps = null;
                PreparedStatement ps1 = null;
                ResultSet rs = null;
                ps = DatabaseConnection.getConnection().prepareStatement("UPDATE 锻造材料表 SET 物品代码 = ?, 物品数量 = ? WHERE id = ?");
                ps1 = DatabaseConnection.getConnection().prepareStatement("SELECT * FROM 锻造材料表 WHERE id = ?");
                ps1.setInt(1, Integer.parseInt(this.锻造序号.getText()));
                rs = ps1.executeQuery();
                if (rs.next()) {
                    String sqlString2 = null;
                    String sqlString3 = null;
                    sqlString2 = "update 锻造材料表 set 物品代码='" + this.锻造材料代码.getText() + "' where id=" + this.锻造序号.getText() + ";";
                    PreparedStatement dropperid = DatabaseConnection.getConnection().prepareStatement(sqlString2);
                    dropperid.executeUpdate(sqlString2);
                    sqlString3 = "update 锻造材料表 set 物品数量='" + this.锻造材料数量.getText() + "' where id=" + this.锻造序号.getText() + ";";
                    PreparedStatement itemid = DatabaseConnection.getConnection().prepareStatement(sqlString3);
                    itemid.executeUpdate(sqlString3);
                    JOptionPane.showMessageDialog(null, "修改成功。");
                }
            } catch (SQLException ex) {

            }
        }
    }//GEN-LAST:event_修改锻造材料ActionPerformed

    private void 删除锻造材料ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_删除锻造材料ActionPerformed
        PreparedStatement ps1 = null;
        ResultSet rs = null;
        boolean result = this.锻造序号.getText().matches("[0-9]+");
        if (result == true) {

            try {
                ps1 = DatabaseConnection.getConnection().prepareStatement("SELECT * FROM 锻造材料表 WHERE id = ?");
                ps1.setInt(1, Integer.parseInt(this.锻造序号.getText()));
                rs = ps1.executeQuery();
                if (rs.next()) {
                    String sqlstr = " delete from 锻造材料表 where id =" + Integer.parseInt(this.锻造序号.getText()) + "";
                    ps1.executeUpdate(sqlstr);
                    JOptionPane.showMessageDialog(null, "删除成功。");
                    刷新锻造所需材料();
                    刷新锻造奖励();
                }
            } catch (SQLException ex) {
                Logger.getLogger(ZeroMS_UI.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
    }//GEN-LAST:event_删除锻造材料ActionPerformed

    private void 删除锻造材料1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_删除锻造材料1ActionPerformed
        PreparedStatement ps1 = null;
        ResultSet rs = null;
        boolean result = this.锻造序号1.getText().matches("[0-9]+");
        if (result == true) {

            try {
                ps1 = DatabaseConnection.getConnection().prepareStatement("SELECT * FROM 锻造物品表 WHERE id = ?");
                ps1.setInt(1, Integer.parseInt(this.锻造序号1.getText()));
                rs = ps1.executeQuery();
                if (rs.next()) {
                    String sqlstr = " delete from 锻造物品表 where id =" + Integer.parseInt(this.锻造序号1.getText()) + "";
                    ps1.executeUpdate(sqlstr);
                    JOptionPane.showMessageDialog(null, "删除成功。");
                    刷新锻造所需材料();
                    刷新锻造奖励();

                }
            } catch (SQLException ex) {
                Logger.getLogger(ZeroMS_UI.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
    }//GEN-LAST:event_删除锻造材料1ActionPerformed

    private void 修改锻造材料1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_修改锻造材料1ActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_修改锻造材料1ActionPerformed

    private void 新增锻造材料1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_新增锻造材料1ActionPerformed
        boolean result1 = this.锻造编号1.getText().matches("[0-9]+");
        boolean result2 = this.锻造材料代码1.getText().matches("[0-9]+");
        boolean result3 = this.锻造材料数量1.getText().matches("[0-9]+");
        if (result1 && result2 && result3) {
            try (Connection con = DatabaseConnection.getConnection(); PreparedStatement ps = con.prepareStatement("INSERT INTO 锻造物品表 (id2,物品代码,物品数量,绑定,可升级次数,力量,敏捷,智力,运气,HP,MP,物理攻击力,物理防御力,魔法攻击力,魔法防御力,命中率,回避率,跳跃力,移动速度,限时) VALUES (  ?, ?, ?,?,?, ?, ?, ?,?,?, ?, ?, ?,?,?, ?, ?, ?,?,?)")) {
                ps.setInt(1, Integer.parseInt(this.锻造编号1.getText()));
                ps.setInt(2, Integer.parseInt(this.锻造材料代码1.getText()));
                ps.setInt(3, Integer.parseInt(this.锻造材料数量1.getText()));
                ps.setInt(4, Integer.parseInt(this.状态.getText()));
                ps.setInt(5, Integer.parseInt(this.升级.getText()));
                ps.setInt(6, Integer.parseInt(this.力量.getText()));
                ps.setInt(7, Integer.parseInt(this.敏捷.getText()));
                ps.setInt(8, Integer.parseInt(this.智力.getText()));
                ps.setInt(9, Integer.parseInt(this.运气.getText()));
                ps.setInt(10, Integer.parseInt(this.HP.getText()));
                ps.setInt(11, Integer.parseInt(this.MP.getText()));
                ps.setInt(12, Integer.parseInt(this.物攻.getText()));
                ps.setInt(13, Integer.parseInt(this.物防.getText()));
                ps.setInt(14, Integer.parseInt(this.魔攻.getText()));
                ps.setInt(15, Integer.parseInt(this.魔防.getText()));
                ps.setInt(16, Integer.parseInt(this.命中.getText()));
                ps.setInt(17, Integer.parseInt(this.闪避.getText()));
                ps.setInt(18, Integer.parseInt(this.跳跃.getText()));
                ps.setInt(19, Integer.parseInt(this.移速.getText()));
                ps.setInt(20, Integer.parseInt(this.限时.getText()));
                ps.executeUpdate();
            } catch (SQLException ex) {
                Logger.getLogger(ZeroMS_UI.class.getName()).log(Level.SEVERE, null, ex);
            }
            JOptionPane.showMessageDialog(null, "添加成功。");
        } else {
            JOptionPane.showMessageDialog(null, "请填写正确的值。");
        }
    }//GEN-LAST:event_新增锻造材料1ActionPerformed

    private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton2ActionPerformed
     JOptionPane.showMessageDialog(null, "请在应用下载区域，下载“锻造模板”脚本。");
    }//GEN-LAST:event_jButton2ActionPerformed
    public void 刷新锻造所需材料() {
        for (int i = ((DefaultTableModel) (this.锻造所需材料.getModel())).getRowCount() - 1; i >= 0; i--) {
            ((DefaultTableModel) (this.锻造所需材料.getModel())).removeRow(i);
        }
        try {
            Connection con = DatabaseConnection.getConnection();
            PreparedStatement ps = null;
            ResultSet rs = null;
            ps = con.prepareStatement("SELECT * FROM 锻造材料表 WHERE id2 =" + 查看编号.getText() + "");
            rs = ps.executeQuery();
            while (rs.next()) {
                ((DefaultTableModel) 锻造所需材料.getModel()).insertRow(锻造所需材料.getRowCount(), new Object[]{
                    rs.getInt("id"),
                    rs.getInt("id2"),
                    rs.getInt("物品代码"),
                    MapleItemInformationProvider.getInstance().getName(rs.getInt("物品代码")),
                    rs.getInt("物品数量")

                });
            }
        } catch (SQLException ex) {
            Logger.getLogger(ZeroMS_UI.class.getName()).log(Level.SEVERE, null, ex);
        }
        锻造所需材料.addMouseListener(new MouseAdapter() {
            public void mouseClicked(MouseEvent e) {
                int i = 锻造所需材料.getSelectedRow();
                String a = 锻造所需材料.getValueAt(i, 0).toString();
                String a1 = 锻造所需材料.getValueAt(i, 1).toString();
                String a2 = 锻造所需材料.getValueAt(i, 2).toString();
                String a4 = 锻造所需材料.getValueAt(i, 4).toString();
                锻造序号.setText(a);
                锻造编号.setText(a1);
                锻造材料代码.setText(a2);
                锻造材料数量.setText(a4);
            }
        });
    }

    public void 刷新锻造奖励() {
        for (int i = ((DefaultTableModel) (this.锻造完成物品.getModel())).getRowCount() - 1; i >= 0; i--) {
            ((DefaultTableModel) (this.锻造完成物品.getModel())).removeRow(i);
        }
        try {
            Connection con = DatabaseConnection.getConnection();
            PreparedStatement ps = null;
            ResultSet rs = null;
            ps = con.prepareStatement("SELECT * FROM 锻造物品表 WHERE id2 =" + 查看编号.getText() + "");
            rs = ps.executeQuery();
            while (rs.next()) {
                ((DefaultTableModel) 锻造完成物品.getModel()).insertRow(锻造完成物品.getRowCount(), new Object[]{
                    rs.getInt("id"),
                    rs.getInt("id2"),
                    rs.getInt("物品代码"),
                    MapleItemInformationProvider.getInstance().getName(rs.getInt("物品代码")),
                    rs.getInt("物品数量"),
                    ///////////////////
                    rs.getInt("绑定"),
                    rs.getInt("可升级次数"),
                    rs.getInt("力量"),
                    rs.getInt("敏捷"),
                    rs.getInt("智力"),
                    rs.getInt("运气"),
                    rs.getInt("HP"),
                    rs.getInt("MP"),
                    rs.getInt("物理攻击力"),
                    rs.getInt("物理防御力"),
                    rs.getInt("魔法攻击力"),
                    rs.getInt("魔法防御力"),
                    rs.getInt("命中率"),
                    rs.getInt("回避率"),
                    rs.getInt("跳跃力"),
                    rs.getInt("移动速度"),
                    rs.getInt("限时")
                });
            }
        } catch (SQLException ex) {
            Logger.getLogger(ZeroMS_UI.class.getName()).log(Level.SEVERE, null, ex);
        }
        锻造完成物品.addMouseListener(new MouseAdapter() {
            public void mouseClicked(MouseEvent e) {
                int i = 锻造完成物品.getSelectedRow();
                String a = 锻造完成物品.getValueAt(i, 0).toString();
                String a1 = 锻造完成物品.getValueAt(i, 1).toString();
                String a2 = 锻造完成物品.getValueAt(i, 2).toString();
                String a4 = 锻造完成物品.getValueAt(i, 4).toString();
                String a5 = 锻造完成物品.getValueAt(i, 5).toString();
                String a6 = 锻造完成物品.getValueAt(i, 6).toString();
                String a7 = 锻造完成物品.getValueAt(i, 7).toString();
                String a8 = 锻造完成物品.getValueAt(i, 8).toString();
                String a9 = 锻造完成物品.getValueAt(i, 9).toString();
                String a10 = 锻造完成物品.getValueAt(i, 10).toString();
                String a11 = 锻造完成物品.getValueAt(i, 11).toString();
                String a12 = 锻造完成物品.getValueAt(i, 12).toString();
                String a13 = 锻造完成物品.getValueAt(i, 13).toString();
                String a14 = 锻造完成物品.getValueAt(i, 14).toString();
                String a15 = 锻造完成物品.getValueAt(i, 15).toString();
                String a16 = 锻造完成物品.getValueAt(i, 16).toString();
                String a17 = 锻造完成物品.getValueAt(i, 17).toString();
                String a18 = 锻造完成物品.getValueAt(i, 18).toString();
                String a19 = 锻造完成物品.getValueAt(i, 19).toString();
                String a20 = 锻造完成物品.getValueAt(i, 20).toString();
                String a21 = 锻造完成物品.getValueAt(i, 21).toString();
                锻造序号1.setText(a);
                锻造编号1.setText(a1);
                锻造材料代码1.setText(a2);
                锻造材料数量1.setText(a4);
                状态.setText(a5);
                升级.setText(a6);
                力量.setText(a7);
                敏捷.setText(a8);
                智力.setText(a9);
                运气.setText(a10);
                HP.setText(a11);
                MP.setText(a12);
                物攻.setText(a13);
                物防.setText(a14);
                魔攻.setText(a15);
                魔防.setText(a16);
                命中.setText(a17);
                闪避.setText(a18);
                跳跃.setText(a19);
                移速.setText(a20);
                限时.setText(a21);
            }
        });
    }

    public static void main(String args[]) {
        try {
            for (UIManager.LookAndFeelInfo info : UIManager.getInstalledLookAndFeels()) {
                if ("Nimbus".equals(info.getName())) {
                    UIManager.setLookAndFeel(info.getClassName());
                    break;
                }
            }
        } catch (ClassNotFoundException | InstantiationException | IllegalAccessException | javax.swing.UnsupportedLookAndFeelException ex) {
            Logger.getLogger(ZeroMS_UI.class.getName()).log(Level.SEVERE, null, ex);
        }
        //</editor-fold>
        锻造控制台.setDefaultLookAndFeelDecorated(true);
        JDialog.setDefaultLookAndFeelDecorated(true);
        try {
            UIManager.setLookAndFeel(UIManager.getCrossPlatformLookAndFeelClassName());
            UIManager.setLookAndFeel(new SubstanceBusinessBlackSteelLookAndFeel());
            // UIManager.setLookAndFeel(new SubstanceBusinessLookAndFeel());
        } catch (Exception e) {
            e.printStackTrace();
        }
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                new 锻造控制台().setVisible(true);
            }
        });
    }

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JTextField HP;
    private javax.swing.JTextField MP;
    private javax.swing.JButton jButton1;
    private javax.swing.JButton jButton2;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel10;
    private javax.swing.JLabel jLabel11;
    private javax.swing.JLabel jLabel12;
    private javax.swing.JLabel jLabel13;
    private javax.swing.JLabel jLabel14;
    private javax.swing.JLabel jLabel15;
    private javax.swing.JLabel jLabel16;
    private javax.swing.JLabel jLabel17;
    private javax.swing.JLabel jLabel18;
    private javax.swing.JLabel jLabel19;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel20;
    private javax.swing.JLabel jLabel21;
    private javax.swing.JLabel jLabel22;
    private javax.swing.JLabel jLabel23;
    private javax.swing.JLabel jLabel24;
    private javax.swing.JLabel jLabel25;
    private javax.swing.JLabel jLabel26;
    private javax.swing.JLabel jLabel27;
    private javax.swing.JLabel jLabel28;
    private javax.swing.JLabel jLabel29;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel30;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JLabel jLabel5;
    private javax.swing.JLabel jLabel6;
    private javax.swing.JLabel jLabel7;
    private javax.swing.JLabel jLabel8;
    private javax.swing.JLabel jLabel9;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JPanel jPanel2;
    private javax.swing.JPanel jPanel3;
    private javax.swing.JPanel jPanel4;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JScrollPane jScrollPane2;
    private javax.swing.JButton 修改锻造材料;
    private javax.swing.JButton 修改锻造材料1;
    private javax.swing.JButton 删除锻造材料;
    private javax.swing.JButton 删除锻造材料1;
    private javax.swing.JTextField 力量;
    private javax.swing.JTextField 升级;
    private javax.swing.JTextField 命中;
    private javax.swing.JTextField 敏捷;
    private javax.swing.JButton 新增锻造材料;
    private javax.swing.JButton 新增锻造材料1;
    private javax.swing.JTextField 智力;
    private javax.swing.JTextField 查看编号;
    private javax.swing.JTextField 物攻;
    private javax.swing.JTextField 物防;
    private javax.swing.JTextField 状态;
    private javax.swing.JButton 状态详细;
    private javax.swing.JTextField 移速;
    private javax.swing.JTextField 跳跃;
    private javax.swing.JTextField 运气;
    private javax.swing.JTable 锻造完成物品;
    private javax.swing.JTextField 锻造序号;
    private javax.swing.JTextField 锻造序号1;
    private javax.swing.JTable 锻造所需材料;
    private javax.swing.JTextField 锻造材料代码;
    private javax.swing.JTextField 锻造材料代码1;
    private javax.swing.JTextField 锻造材料数量;
    private javax.swing.JTextField 锻造材料数量1;
    private javax.swing.JTextField 锻造编号;
    private javax.swing.JTextField 锻造编号1;
    private javax.swing.JTextField 闪避;
    private javax.swing.JTextField 限时;
    private javax.swing.JTextField 魔攻;
    private javax.swing.JLabel 魔攻1;
    private javax.swing.JTextField 魔防;
    // End of variables declaration//GEN-END:variables
}
